package com.njtoyo.taxi.admin.rest.controller.business;

import cn.hutool.core.util.StrUtil;
import com.njtoyo.netrides.entity.CompanyBank;
import com.njtoyo.taxi.admin.aop.PermissionScope;
import com.njtoyo.taxi.admin.rest.presenter.business.ride.SimpleRideDetailPresenter;
import com.njtoyo.taxi.admin.service.business.CompanyBankService;
import com.taxi.entity.common.RestResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("business/company-bank")
public class CompanyBankController {

    @Autowired
    private CompanyBankService companyBankService;


    @GetMapping("/{companyId}/getByCompanyId")
    RestResult getByCompanyId(@PathVariable("companyId") Long companyId) {
        return companyBankService.getByCompanyId(companyId);
    }

//    @PostMapping("/saveOrUpdate")
//    RestResult saveOrUpdate(@RequestBody Ad companyBank) {
//        if (StrUtil.isBlank(companyBank.getBankName())) {
//            return RestResult.failed("请输入银行名称");
//        }
//        if (StrUtil.isBlank(companyBank.getNameOnCard())) {
//            return RestResult.failed("请输入收款人姓名");
//        }
//        if (StrUtil.isBlank(companyBank.getCardNumber())) {
//            return RestResult.failed("请输入卡号");
//        }
//        if (StrUtil.isBlank(companyBank.getBankCity())) {
//            return RestResult.failed("请输入开户城市");
//        }
//        return companyBankService.saveOrUpdateBank(companyBank);
//    }


}
